﻿using Computer_Manager.DAL;
using Computer_Manager.DTO;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Computer_Manager.BUS
{
    public class BUS_roles
    {
        DAL_roles dal = new DAL_roles();

        public void roles_insert(DTO_roles obj)
        {
            try
            {
                dal.roles_insert(obj);
            }
            catch (Exception)
            {

                throw;
            }

        }

        public void roles_Update(DTO_roles obj)
        {
            try
            {
                dal.roles_Update(obj);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public void roles_Delete(DTO_roles obj)
        {
            try
            {
                dal.roles_Delete(obj);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public DataTable GetByID(DTO_roles obj)
        {
            DataTable dt = new DataTable();
            try
            {
                dt = dal.GetByID(obj);
            }
            catch (Exception)
            {

                throw;
            }
            return dt;
        }

        public DataTable GetAll()
        {
            DataTable dt = new DataTable();
            try
            {
                dt = dal.GetAll();

            }
            catch (Exception)
            {

                throw;
            }
            return dt;
        }
    }
}
